package com.base.cn.platform.os.common.utils.user;

import java.util.regex.Pattern;

public class UserUtils {

    public static boolean isEmail(String email) {
        String check = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
        return Pattern.compile(check).matcher(email).matches();
    }

    public static boolean isMobile(String mobile) {
        String _check = "^1[0-9]{10}$";
        return Pattern.compile(_check).matcher(mobile).matches();
    }
}
